package top.rainf.mapper;

import org.apache.ibatis.annotations.Param;
import top.rainf.domain.vo.Notice;
import org.apache.ibatis.annotations.Mapper;
import top.rainf.domain.vo.Post;

import java.util.List;

/**
 * @author 星环
 * @date 2023/5/10 11:37:28
 * @description
 */
 @Mapper
public interface NoticeMapper {


    List<Notice> selectAll();
    Notice selectById(int id);

    int deleteById(int id);

    int deleteByIds(List<Integer> idList);

    int updateById(Notice notice);

    int insertOne(@Param("receiverId") int receiverId,@Param("content") String content);

    List<Notice> selectUserSimpleNoticeListPaged(@Param("userId") int userId,
                                                 @Param("start") int start,
                                                 @Param("numPerPage") int numPerPage);

    int selectCountOfUserNotice(int userId);

    void updateCheckByIds(@Param("list") List<Integer> ids,@Param("state") int i);

    int selectUserNewNoticeCount(int userId);
}
